package com.codegeek.project.slope.mapper;

import com.codegeek.project.slope.domain.SlopeDevice;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 设备Mapper接口
 *
 * @author codegeek
 * @date 2020-02-17
 */
public interface SlopeDeviceMapper
{
    /**
     * 查询设备
     *
     * @param deviceId 设备ID
     * @return 设备
     */
    public SlopeDevice selectSlopeDeviceById(Long deviceId);

    /**
     * 查询设备列表
     *
     * @param slopeDevice 设备
     * @return 设备集合
     */
    public List<SlopeDevice> selectSlopeDeviceList(SlopeDevice slopeDevice);

    /**
     * 查询其他设备列表
     *
     * @param slopeDevice 设备
     * @return 设备集合
     */
    public List<SlopeDevice> selectSlopeOtherDeviceList(SlopeDevice slopeDevice);

    /**
     * 新增设备
     *
     * @param slopeDevice 设备
     * @return 结果
     */
    public int insertSlopeDevice(SlopeDevice slopeDevice);

    /**
     * 修改设备
     *
     * @param slopeDevice 设备
     * @return 结果
     */
    public int updateSlopeDevice(SlopeDevice slopeDevice);

    /**
     * 删除设备
     *
     * @param deviceId 设备ID
     * @return 结果
     */
    public int deleteSlopeDeviceById(Long deviceId);

    /**
     * 批量删除设备
     *
     * @param deviceIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteSlopeDeviceByIds(Long[] deviceIds);


    public SlopeDevice getDeviceByImei(@Param("imei") String imei);
}
